home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
appshell
/
appprint.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
3KB
|
108 lines
VERSION 2.00
Begin Form AppPrint
BorderStyle = 3 'Fixed Double
Caption = "Print"
ClientHeight = 2190
ClientLeft = 2445
ClientTop = 3060
ClientWidth = 3720
Height = 2595
Left = 2385
LinkMode = 1 'Source
LinkTopic = "Form2"
ScaleHeight = 2190
ScaleWidth = 3720
Top = 2715
Width = 3840
Begin CommandButton CancelCmd
Cancel = -1 'True
Caption = "Cancel"
Height = 315
Left = 2520
TabIndex = 4
Top = 960
Width = 1035
End
Begin CommandButton OKCmd
Caption = "OK"
Default = -1 'True
Height = 315
Left = 2520
TabIndex = 3
Top = 540
Width = 1035
End
Begin TextBox Copies
Height = 315
Left = 1020
TabIndex = 5
Text = "1"
Top = 540
Width = 855
End
Begin PictureBox Picture1
BackColor = &H00000000&
Height = 45
Left = 0
ScaleHeight = 15
ScaleWidth = 4065
TabIndex = 1
Top = 300
Width = 4095
End
Begin Label CopiesLbl
Caption = "&Copies:"
Height = 195
Left = 180
TabIndex = 2
Top = 600
Width = 735
End
Begin Label PrintingToLbl
Height = 195
Left = 60
TabIndex = 0
Top = 60
Width = 3615
End
End
Sub CancelCmd_Click ()
Unload AppPrint
End Sub
Sub Form_Load ()
Remove_Items_From_SysMenu AppPrint
Place_DialogBox_in_Form AppPrint, AppMain
'
' determine printer to print to
'
If App_PrinterName = "" Then
'
' get the Windows default printer
'
GetDefaultPrinter App_PrinterName, App_PrinterDriver, App_PrinterPort
End If
PrintingToLbl.Caption = App_PrinterName + " on " + App_PrinterPort
End Sub
Sub OKCmd_Click ()
'
' validate the printing parameters
'
If Val(Copies.Text) < 1 Or Val(Copies.Text) > 32000 Then
MsgBox "Copies must be between 1 and 32000", MB_ICONEXCLAMATION, APP_NAME
Exit Sub
End If
App_PrintCopies = Val(Copies.Text)
Unload AppPrint
End Sub